package com.ruoyi.web.tdm.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.web.tdm.mapper.TdmLiLunMapper;
import com.ruoyi.web.tdm.domain.TdmLiLun;
import com.ruoyi.web.tdm.service.ITdmLiLunService;

/**
 * 塔板理论Service业务层处理
 * 
 * @author ly
 * @date 2022-03-11
 */
@Service
public class TdmLiLunServiceImpl implements ITdmLiLunService 
{
    @Autowired
    private TdmLiLunMapper tdmLiLunMapper;

    /**
     * 查询塔板理论
     * 
     * @param id 塔板理论主键
     * @return 塔板理论
     */
    @Override
    public TdmLiLun selectTdmLiLunById(Long id)
    {
        return tdmLiLunMapper.selectTdmLiLunById(id);
    }

    /**
     * 查询塔板理论列表
     * 
     * @param tdmLiLun 塔板理论
     * @return 塔板理论
     */
    @Override
    public List<TdmLiLun> selectTdmLiLunList(TdmLiLun tdmLiLun)
    {
        return tdmLiLunMapper.selectTdmLiLunList(tdmLiLun);
    }

    /**
     * 新增塔板理论
     * 
     * @param tdmLiLun 塔板理论
     * @return 结果
     */
    @Override
    public int insertTdmLiLun(TdmLiLun tdmLiLun)
    {
        tdmLiLun.setCreateTime(DateUtils.getNowDate());
        return tdmLiLunMapper.insertTdmLiLun(tdmLiLun);
    }

    /**
     * 修改塔板理论
     * 
     * @param tdmLiLun 塔板理论
     * @return 结果
     */
    @Override
    public int updateTdmLiLun(TdmLiLun tdmLiLun)
    {
        tdmLiLun.setUpdateTime(DateUtils.getNowDate());
        return tdmLiLunMapper.updateTdmLiLun(tdmLiLun);
    }

    /**
     * 批量删除塔板理论
     * 
     * @param ids 需要删除的塔板理论主键
     * @return 结果
     */
    @Override
    public int deleteTdmLiLunByIds(Long[] ids)
    {
        return tdmLiLunMapper.deleteTdmLiLunByIds(ids);
    }

    /**
     * 删除塔板理论信息
     * 
     * @param id 塔板理论主键
     * @return 结果
     */
    @Override
    public int deleteTdmLiLunById(Long id)
    {
        return tdmLiLunMapper.deleteTdmLiLunById(id);
    }
}
